package com.ict.web.service.impl;

import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ict.common.core.domain.AjaxResult;
import com.ict.web.domain.ProjectSystemInfo;
import com.ict.web.mapper.ProjectSystemInfoMapper;
import com.ict.web.service.ProjectSystemInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class ProjectSystemInfoServiceImpl extends ServiceImpl<ProjectSystemInfoMapper, ProjectSystemInfo> implements ProjectSystemInfoService {

    @Override
    public AjaxResult saveSysInfo(ProjectSystemInfo info) {
        info.setId(IdUtil.getSnowflakeNextId());
        save(info);
        return AjaxResult.success("新增成功!");
    }

    @Override
    public AjaxResult updateSysInfo(ProjectSystemInfo info) {
        updateById(info);
        return AjaxResult.success("修改成功!");
    }
}
